/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */
import { StackNavigator, TabNavigator } from 'react-navigation';
import React, { Component } from 'react';
import { Alert, Platform, StyleSheet, Text, View, Image, Button, ScrollView, TouchableHighlight, PixelRatio, TextInput } from 'react-native';
import Ionicons from 'react-native-vector-icons/Ionicons';
import IndexScreen from './page/IndexPage';
import DayScreen from './page/DayPage';
import MomentScreen from './page/MomentPage';
import PersonalScreen from './page/PersonalPage';
import NewGoalScreen from './page/NewGoalPage';
import ViewGoalScreen from './page/ViewGoalPage';
import TimeAxisScreen from './page/TimeAxisPage';
import MyMomentScreen from './page/MyMomentPage';
import WriteMomentScreen from './page/WriteMomentPage';
import LoginScreen from './page/LoginPage';
import SignUpScreen from './page/SignUpPage';
import SetUpScreen from './page/SetUpPage';
import ReportScreen from './page/ReportPage';

const MainScreenNavigator = TabNavigator({
    Index: {
        screen: IndexScreen
    },
    Day: {
        screen: DayScreen
    },
    Moment: {
        screen: MomentScreen
    },
    Personal: {
        screen: PersonalScreen
    },
},
    {

        navigationOptions: {
            headerStyle: {
                height: 45,
            },
            headerLeft: <View style={{
                margin: 10
            }}></View>,

            headerTitleStyle: {
                fontWeight: 'normal',
                color: '#2196F7',
                alignSelf: 'center',
            },

            animationEnabled: true,
        },

        tabBarPosition: 'bottom',

        tabBarOptions: {
            tabBarComponent: 'TabBarBottom',
            activeTintColor: '#FFFFFF',
            showIcon: true, // android 默认不显示 icon, 需要设置为 true 才会显示
            indicatorStyle: {
                height: 0,
            }, // 如TabBar下面显示有一条线，可以设高度为0后隐藏
            style: {
                height: 60,
            },
            labelStyle: {
                fontSize: 12, // 文字大小
            },
        },

    }
);

const SignNavigator = StackNavigator ({
	Login: {
		screen: LoginScreen
	},
	SignUp: {
		screen: SignUpScreen
	},
})

const GoalApp = StackNavigator({
    
    Sign: {
        screen: SignNavigator
    },
    NewGoal: {
        screen: NewGoalScreen
    },
    Main: {
        screen: MainScreenNavigator
    },
    
    ViewGoal: {
        screen: ViewGoalScreen
    },
    TimeAxis: {
        screen: TimeAxisScreen
    },
    WriteMoment: {
        screen: WriteMomentScreen
    },
    MyMoment: {
        screen: MyMomentScreen
    },
	SetUp: {
		screen: SetUpScreen
	},
	Report: {
		screen: ReportScreen
	},
	WriteMoment: {
        screen: WriteMomentScreen
    },
	Moment: {
		screen: MomentScreen
	},
});


export default GoalApp;
